{% include "header.html"%}
<div class="container">
  <table class="table table-bordered table-striped">
    <tr>
      <th>序号</th>
      <th>时间</th>
      <th>申请人</th>
      <th>申请类型</th>
      <th>审核人</th>
      <th>申请内容</th>
      <th>状态</th>
      <th>操作</th>
    </tr>
    {% for audit in audits %}
    <tr>
      <td>
        <div>{{audit.Id}}</div>
      </td>
      <td>
        <div>{{audit.UpdateTime}}</div>
      </td>
      <td>
        <div>{{audit.ApplyUser}}</div>
      </td>
      <td>
        <div>
            {% if audit.ApplyType == 0%} 新增订阅 {% endif %}
            {% if audit.ApplyType == 1%} 更新订阅 {% endif %}
        </div>
      </td>
      <td>
        <div>{{audit.AuditUser}}</div>
      </td>
      <td>
        <div>
          <button type="button" class="btn btn-info btn-sm" onclick="getDialogAudit(this, {{audit.Id}})" data-toggle="modal">
              订阅详情
          </button>
        </div>
      </td>
      <td>
        <div>
            {% if audit.State == 0%} 未处理{% endif %}
            {% if audit.State == 1%} 处理中{% endif %}
            {% if audit.State == 2%} 已同意{% endif %}
            {% if audit.State == 3%} 不同意{% endif %}
            {% if audit.State == 4%} 已启用{% endif %}
        </div>
      </td>
      <td>
        <div>
          <button class="btn btn-sm btn-success" {% if audit.State >= 1 %} disabled {% endif %} onclick="auditApprove({{audit.Id}})">同意</button>
          <button class="btn btn-sm btn-danger" {% if audit.State >= 1 %} disabled {% endif %} onclick="auditDeny({{audit.Id}})">不同意</button>
        </div>
      </td>
    </tr>
    {% endfor %}
  </table>
</div>
{% include "footer.html" %}